from flask import Blueprint,render_template
from app.models import db

dbo = Blueprint("dbo", __name__)


# json显示(自定义方法一)
@dbo.route("/json3")
def dbo1():
    sql = "select * from avg_money_city"
    data = db.session.execute(sql).fetchall()
    emp_json_list = [dict(zip(item.keys(), item)) for item in data]
    return str(emp_json_list).replace("'",'"').replace("None",'"null"')